package csc.fresher.finalgroupfour.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import csc.fresher.finalgroupfour.dao.StateDAO;
import csc.fresher.finalgroupfour.domain.State;

@Service
public class StateService {
	@Autowired
	private StateDAO stateDAO;
	
	public void addState(State state) {
		stateDAO.addState(state);
	}

	public List<State> listStates() {
		return stateDAO.listStates();
	}

	public void updateState(State state) {
		stateDAO.updateState(state);
	}

	public void deleteState(State state) {
		stateDAO.deleteState(state);
	}
	
	public State findState(String stateName) {
		return stateDAO.findState(stateName);
	}
}
